{use master_page('front/v_article_master')}

{block main}

<!-- 文章翻页检索 -->
<center>
<div class="line" >
	<form class="listform"  action="<?=_U("article/index")?>" method="get">
	<?
	$where = $this->Request();
	// print_r($article_class);exit;
	// $where["class.id"] = $article_class->id;   
	if(!empty($_GET['title']))
	{
		$where['article.title'] = "like '%".$this->input->get('title')."%'";
	}
	$where['page_size'] = 20; 
	// $where['page'] = !isset($_GET['page'])?1:$this->input->get('page');
	$articles = $this->article_manager->get_list($where);
	$record_count = $this->article_manager->query_result->record_count;
	$page_size=$where['page_size'];
	?>
	<div style="border:0px solid black;">
		<dl class="list">
			<dt><span class="N2">NAME</span><span class="N3">DATE</span></dt>
			<? foreach ( $articles as $article):?>
			<dd>
				<span class="N2"><a href="<?=_U("article/show?id=$article->id")?>" target="_self"><?=mb_substr($article->title,0,11,'UTF8')?>...</a></span>
				<span class="N3">{article->contribute_time}</span>
			</dd>
			<? endforeach;?>
		</dl>
	</div>
	<?$this->load->view('front/v_pager_form',array('record_count'=>$record_count,'page_size'=>$page_size))?>
	</form> 
</div>
</center>
{end}